import path from "path";
import { createSvgIconsPlugin } from "vite-plugin-svg-icons";

export default function createSvgIcon(root: string) {
  return createSvgIconsPlugin({
    // 指定图标文件夹
    iconDirs: [path.resolve(root, "src/icons/svg")],
    // 指定 symbolId 格式
    symbolId: "icon-[dir]-[name]"
  });
}
